package com.ethink.warehouse.api.component.request;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.List;

@Data
public class WarehouseConfirmOutStockRequest {
    /**
     * --标准字段----------------------------------------------------------------------------------
     **/
    @Schema(description = "出库单编号")
    @NotNull
    private String orderNo;

    @Schema(description = "外部出库单编号")
    private String outOrderNo;

    @Schema(description = "货主编码")
    private String ownerCode;

    @Schema(description = "出库类型")
    private Integer outStockType;

    @Schema(description = "出库状态")
    private Integer outStockStatus;

    @Schema(description = " 确认出库时间")
    private String orderConfirmTime;

    @Schema(description = "出库商品信息")
    private List<ItemInfo> items;

    @Schema(description = "备注")
    private String remark;


    /**
     * --青岛仓字段----------------------------------------------------------------------------------
     **/
    @Schema(description = "快递单号")
    private String expressCode;
    @Schema(description = "物流公司编码")
    private String logisticsCode;
    @Schema(description = "物流公司名称")
    private String logisticsName;
    @Schema(description = "是否多次发货,0-否,1-是")
    private Integer confirmType;

    /**
     * --京东仓字段----------------------------------------------------------------------------------
     **/


    @Data
    public static class ItemInfo {
        /**
         * --标准字段----------------------------------------------------------------------------------
         **/
        @Schema(description = "商品编码")
        private String mateSku;

        @Schema(description = "外部商品编码")
        private String mateItemId;

        @Schema(description = "实际出库数量")
        private Integer actualQty;

        @Schema(description = "出库批次明细")
        private List<ItemBatch> batches;

        /**
         * --青岛仓字段----------------------------------------------------------------------------------
         **/


        /**
         * --京东仓字段----------------------------------------------------------------------------------
         **/
    }

    @Data
    public static class ItemBatch {

        @Schema(description = "实际出库数量")
        private Integer actualQty;

        @Schema(description = "外部批次号")
        private String batchCode;

        @Schema(description = "生产日期")
        private String productDate;

        @Schema(description = "失效日期")
        private String expireDate;

        @Schema(description = "生产批号")
        private String produceCode;

        @Schema(description = "库存类型: ZP=正品, CC=残次,JS=机损, XS=箱损")
        private String inventoryType;
    }
}
